package DomainObject;

import java.io.Serializable;

import ca.etsmtl.log720.lab1.Infraction;
import ca.etsmtl.log720.lab1.InfractionPOA;
//create by martin souliere
@SuppressWarnings("serial")
public class InfractionImpl extends InfractionPOA implements Serializable{ 

	protected int _id;
	protected String _description;
	protected int _niveau;
	public InfractionImpl(Infraction current) {
		_id = current.id();
		_description = current.description();
		_niveau = current.niveau();
	}
	public InfractionImpl(int id,String desc, int niveau) {
		_description = desc;
		_niveau = niveau;
		_id = id;
	}
	public int id() {
		return _id;
	}

	public String description() {
		return _description;
	}

	public int niveau() {
		return _niveau;
	}

	public String _toString() {
		return _description + " " + _niveau;
	}
	
	@Override
    public int hashCode() {  
        return _id;
    }
}
